package com.woniu.humanresource.config;

import com.woniu.humanresource.entity.ResponseText;
import lombok.extern.slf4j.Slf4j;
import nonapi.io.github.classgraph.json.JSONUtils;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


//全局异常配置
@RestControllerAdvice
@Slf4j
public class ExcepetionGlobleConfig {

    @ExceptionHandler
    public ResponseText exceptionGloble(Exception e){
        System.out.println(e.getMessage());
        return  new ResponseText(null, 400,e.getMessage());

    }
}
